﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YhmOA.Common;
using System.Data;
using YhmOA.Model;

namespace YhmOA.PrintDoc.Bank
{
    public partial class TerritoryPaymentInfo : FormPage<PrintDoc_Bank_TerritoryPayment>
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.txt_PowerType.DataSource = DataSourceConfig.GetDataSource("电汇类型");
                this.txt_PowerType.Text = "电汇";
                this.txt_PowerRating.DataSource = DataSourceConfig.GetDataSource("电汇等级");
                this.txt_PowerRating.Text = "普通";
                DataTable dt = new DataTable();
                dt.Columns.Add("预录入编码");
                dt.Columns.Add("可报关金额");
                dt.Columns.Add("本次报关金额");
                DataRow dr = dt.NewRow();
                dr["预录入编码"] = "12345";
                dr["可报关金额"] = "15200000";
                dr["本次报关金额"] = "15200000";
                dt.Rows.Add(dr);
                dr = dt.NewRow();
                dr["预录入编码"] = "67890";
                dr["可报关金额"] = "15200000";
                dr["本次报关金额"] = "15200000";
                dt.Rows.Add(dr);
                dr = dt.NewRow();
                dr["预录入编码"] = "35635";
                dr["可报关金额"] = "15200000";
                dr["本次报关金额"] = "15200000";
                dt.Rows.Add(dr);
                dr = dt.NewRow();
                dr["预录入编码"] = "72821";
                dr["可报关金额"] = "15200000";
                dr["本次报关金额"] = "15200000";
                dt.Rows.Add(dr);
                this.gvShowBGD.AutoGenerateColumns = false;
                this.gvShowBGD.DataSource = dt;
                this.gvShowBGD.DataBind();
            }
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {

        }

        #region 将货币转换成英文
        /// <summary>
        /// 将货币转换成英文
        /// </summary>
        [AjaxMethod]
        public void MoneyToEn()
        {
            this.SetNotAjaxRenderControls(this.txt_LowerAmount);
            this.txt_CapitalAmountEn.Text = Units.GetMoneyToEn(this.txt_LowerAmount.Text);
        }
        #endregion
    }
}